!=====================================================================
!
!          S p e c f e m 3 D  G l o b e  V e r s i o n  4 . 0
!          --------------------------------------------------
!
!          Main authors: Dimitri Komatitsch and Jeroen Tromp
!    Seismological Laboratory, California Institute of Technology, USA
!             and University of Pau / CNRS / INRIA, France
! (c) California Institute of Technology and University of Pau / CNRS / INRIA
!                            February 2008
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! (at your option) any later version.
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License along
! with this program; if not, write to the Free Software Foundation, Inc.,
! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
!
!=====================================================================


  subroutine model_1066a(x,rho,vp,vs,Qkappa,Qmu,iregion_code,M1066a_V)

  implicit none

  include "constants.h"

! model_1066a_variables
  type model_1066a_variables
    sequence
      double precision, dimension(NR_1066A) :: radius_1066a
      double precision, dimension(NR_1066A) :: density_1066a
      double precision, dimension(NR_1066A) :: vp_1066a
      double precision, dimension(NR_1066A) :: vs_1066a
      double precision, dimension(NR_1066A) :: Qkappa_1066a
      double precision, dimension(NR_1066A) :: Qmu_1066a
  end type model_1066a_variables

  type (model_1066a_variables) M1066a_V
! model_1066a_variables

! input:
! radius r: meters

! output:
! density rho: kg/m^3
! compressional wave speed vp: km/s
! shear wave speed vs: km/s

  integer iregion_code

  double precision x,rho,vp,vs,Qmu,Qkappa

  integer i

  double precision r,frac,scaleval

! compute real physical radius in meters
  r = x * R_EARTH

  i = 1
  do while(r >= M1066a_V%radius_1066a(i) .and. i /= NR_1066A)
    i = i + 1
  enddo

! make sure we stay in the right region and never take a point above
! and a point below the ICB or the CMB and interpolate between them,
! which would lead to a wrong value (keeping in mind that we interpolate
! between points i-1 and i below)
  if (iregion_code == IREGION_INNER_CORE .and. i > 33) i = 33

  if (iregion_code == IREGION_OUTER_CORE .and. i < 35) i = 35
  if (iregion_code == IREGION_OUTER_CORE .and. i > 66) i = 66

  if (iregion_code == IREGION_CRUST_MANTLE .and. i < 68) i = 68

  if (i == 1) then
    rho = M1066a_V%density_1066a(i)
    vp = M1066a_V%vp_1066a(i)
    vs = M1066a_V%vs_1066a(i)
    Qmu = M1066a_V%Qmu_1066a(i)
    Qkappa = M1066a_V%Qkappa_1066a(i)
  else

! interpolate from radius_1066a(i-1) to r using the values at i-1 and i
    frac = (r-M1066a_V%radius_1066a(i-1))/(M1066a_V%radius_1066a(i)-M1066a_V%radius_1066a(i-1))

    rho = M1066a_V%density_1066a(i-1) + frac * (M1066a_V%density_1066a(i)-M1066a_V%density_1066a(i-1))
    vp = M1066a_V%vp_1066a(i-1) + frac * (M1066a_V%vp_1066a(i)-M1066a_V%vp_1066a(i-1))
    vs = M1066a_V%vs_1066a(i-1) + frac * (M1066a_V%vs_1066a(i)-M1066a_V%vs_1066a(i-1))
    Qmu = M1066a_V%Qmu_1066a(i-1) + frac * (M1066a_V%Qmu_1066a(i)-M1066a_V%Qmu_1066a(i-1))
    Qkappa = M1066a_V%Qkappa_1066a(i-1) + frac * (M1066a_V%Qkappa_1066a(i)-M1066a_V%Qkappa_1066a(i-1))

  endif

! make sure Vs is zero in the outer core even if roundoff errors on depth
! also set fictitious attenuation to a very high value (attenuation is not used in the fluid)
  if (iregion_code == IREGION_OUTER_CORE) then
    vs = 0.d0
    Qkappa = 3000.d0
    Qmu = 3000.d0
  endif

! non-dimensionalize
! time scaling (s^{-1}) is done with scaleval
  scaleval=dsqrt(PI*GRAV*RHOAV)
  rho=rho*1000.0d0/RHOAV
  vp=vp*1000.0d0/(R_EARTH*scaleval)
  vs=vs*1000.0d0/(R_EARTH*scaleval)

  end subroutine model_1066a

!-------------------

  subroutine define_model_1066a(USE_EXTERNAL_CRUSTAL_MODEL,M1066a_V)

  implicit none
  include "constants.h"

! model_1066a_variables
  type model_1066a_variables
    sequence
      double precision, dimension(NR_1066A) :: radius_1066a
      double precision, dimension(NR_1066A) :: density_1066a
      double precision, dimension(NR_1066A) :: vp_1066a
      double precision, dimension(NR_1066A) :: vs_1066a
      double precision, dimension(NR_1066A) :: Qkappa_1066a
      double precision, dimension(NR_1066A) :: Qmu_1066a
  end type model_1066a_variables

  type (model_1066a_variables) M1066a_V
! model_1066a_variables

  logical USE_EXTERNAL_CRUSTAL_MODEL

  integer i

! define all the values in the model

  M1066a_V%radius_1066a(  1) =  0.000000000000000
  M1066a_V%radius_1066a(  2) =   38400.0000000000
  M1066a_V%radius_1066a(  3) =   76810.0000000000
  M1066a_V%radius_1066a(  4) =   115210.000000000
  M1066a_V%radius_1066a(  5) =   153610.000000000
  M1066a_V%radius_1066a(  6) =   192020.000000000
  M1066a_V%radius_1066a(  7) =   230420.000000000
  M1066a_V%radius_1066a(  8) =   268820.000000000
  M1066a_V%radius_1066a(  9) =   307220.000000000
  M1066a_V%radius_1066a( 10) =   345630.000000000
  M1066a_V%radius_1066a( 11) =   384030.000000000
  M1066a_V%radius_1066a( 12) =   422430.000000000
  M1066a_V%radius_1066a( 13) =   460840.000000000
  M1066a_V%radius_1066a( 14) =   499240.000000000
  M1066a_V%radius_1066a( 15) =   537640.000000000
  M1066a_V%radius_1066a( 16) =   576050.000000000
  M1066a_V%radius_1066a( 17) =   614450.000000000
  M1066a_V%radius_1066a( 18) =   652850.000000000
  M1066a_V%radius_1066a( 19) =   691260.000000000
  M1066a_V%radius_1066a( 20) =   729660.000000000
  M1066a_V%radius_1066a( 21) =   768060.000000000
  M1066a_V%radius_1066a( 22) =   806460.000000000
  M1066a_V%radius_1066a( 23) =   844870.000000000
  M1066a_V%radius_1066a( 24) =   883270.000000000
  M1066a_V%radius_1066a( 25) =   921670.000000000
  M1066a_V%radius_1066a( 26) =   960080.000000000
  M1066a_V%radius_1066a( 27) =   998480.000000000
  M1066a_V%radius_1066a( 28) =   1036880.00000000
  M1066a_V%radius_1066a( 29) =   1075290.00000000
  M1066a_V%radius_1066a( 30) =   1113690.00000000
  M1066a_V%radius_1066a( 31) =   1152090.00000000
  M1066a_V%radius_1066a( 32) =   1190500.00000000
  M1066a_V%radius_1066a( 33) =   1229480.00000000
  M1066a_V%radius_1066a( 34) =   1229480.00000000
  M1066a_V%radius_1066a( 35) =   1299360.00000000
  M1066a_V%radius_1066a( 36) =   1369820.00000000
  M1066a_V%radius_1066a( 37) =   1440280.00000000
  M1066a_V%radius_1066a( 38) =   1510740.00000000
  M1066a_V%radius_1066a( 39) =   1581190.00000000
  M1066a_V%radius_1066a( 40) =   1651650.00000000
  M1066a_V%radius_1066a( 41) =   1722110.00000000
  M1066a_V%radius_1066a( 42) =   1792570.00000000
  M1066a_V%radius_1066a( 43) =   1863030.00000000
  M1066a_V%radius_1066a( 44) =   1933490.00000000
  M1066a_V%radius_1066a( 45) =   2003950.00000000
  M1066a_V%radius_1066a( 46) =   2074410.00000000
  M1066a_V%radius_1066a( 47) =   2144870.00000000
  M1066a_V%radius_1066a( 48) =   2215330.00000000
  M1066a_V%radius_1066a( 49) =   2285790.00000000
  M1066a_V%radius_1066a( 50) =   2356240.00000000
  M1066a_V%radius_1066a( 51) =   2426700.00000000
  M1066a_V%radius_1066a( 52) =   2497160.00000000
  M1066a_V%radius_1066a( 53) =   2567620.00000000
  M1066a_V%radius_1066a( 54) =   2638080.00000000
  M1066a_V%radius_1066a( 55) =   2708540.00000000
  M1066a_V%radius_1066a( 56) =   2779000.00000000
  M1066a_V%radius_1066a( 57) =   2849460.00000000
  M1066a_V%radius_1066a( 58) =   2919920.00000000
  M1066a_V%radius_1066a( 59) =   2990380.00000000
  M1066a_V%radius_1066a( 60) =   3060840.00000000
  M1066a_V%radius_1066a( 61) =   3131300.00000000
  M1066a_V%radius_1066a( 62) =   3201750.00000000
  M1066a_V%radius_1066a( 63) =   3272210.00000000
  M1066a_V%radius_1066a( 64) =   3342670.00000000
  M1066a_V%radius_1066a( 65) =   3413130.00000000
  M1066a_V%radius_1066a( 66) =   3484300.00000000
  M1066a_V%radius_1066a( 67) =   3484300.00000000
  M1066a_V%radius_1066a( 68) =   3518220.00000000
  M1066a_V%radius_1066a( 69) =   3552850.00000000
  M1066a_V%radius_1066a( 70) =   3587490.00000000
  M1066a_V%radius_1066a( 71) =   3622120.00000000
  M1066a_V%radius_1066a( 72) =   3656750.00000000
  M1066a_V%radius_1066a( 73) =   3691380.00000000
  M1066a_V%radius_1066a( 74) =   3726010.00000000
  M1066a_V%radius_1066a( 75) =   3760640.00000000
  M1066a_V%radius_1066a( 76) =   3795270.00000000
  M1066a_V%radius_1066a( 77) =   3829910.00000000
  M1066a_V%radius_1066a( 78) =   3864540.00000000
  M1066a_V%radius_1066a( 79) =   3899170.00000000
  M1066a_V%radius_1066a( 80) =   3933800.00000000
  M1066a_V%radius_1066a( 81) =   3968430.00000000
  M1066a_V%radius_1066a( 82) =   4003060.00000000
  M1066a_V%radius_1066a( 83) =   4037690.00000000
  M1066a_V%radius_1066a( 84) =   4072330.00000000
  M1066a_V%radius_1066a( 85) =   4106960.00000000
  M1066a_V%radius_1066a( 86) =   4141590.00000000
  M1066a_V%radius_1066a( 87) =   4176220.00000000
  M1066a_V%radius_1066a( 88) =   4210850.00000000
  M1066a_V%radius_1066a( 89) =   4245480.00000000
  M1066a_V%radius_1066a( 90) =   4280110.00000000
  M1066a_V%radius_1066a( 91) =   4314740.00000000
  M1066a_V%radius_1066a( 92) =   4349380.00000000
  M1066a_V%radius_1066a( 93) =   4384010.00000000
  M1066a_V%radius_1066a( 94) =   4418640.00000000
  M1066a_V%radius_1066a( 95) =   4453270.00000000
  M1066a_V%radius_1066a( 96) =   4487900.00000000
  M1066a_V%radius_1066a( 97) =   4522530.00000000
  M1066a_V%radius_1066a( 98) =   4557160.00000000
  M1066a_V%radius_1066a( 99) =   4591800.00000000
  M1066a_V%radius_1066a(100) =   4626430.00000000
  M1066a_V%radius_1066a(101) =   4661060.00000000
  M1066a_V%radius_1066a(102) =   4695690.00000000
  M1066a_V%radius_1066a(103) =   4730320.00000000
  M1066a_V%radius_1066a(104) =   4764950.00000000
  M1066a_V%radius_1066a(105) =   4799580.00000000
  M1066a_V%radius_1066a(106) =   4834220.00000000
  M1066a_V%radius_1066a(107) =   4868850.00000000
  M1066a_V%radius_1066a(108) =   4903480.00000000
  M1066a_V%radius_1066a(109) =   4938110.00000000
  M1066a_V%radius_1066a(110) =   4972740.00000000
  M1066a_V%radius_1066a(111) =   5007370.00000000
  M1066a_V%radius_1066a(112) =   5042000.00000000
  M1066a_V%radius_1066a(113) =   5076640.00000000
  M1066a_V%radius_1066a(114) =   5111270.00000000
  M1066a_V%radius_1066a(115) =   5145900.00000000
  M1066a_V%radius_1066a(116) =   5180530.00000000
  M1066a_V%radius_1066a(117) =   5215160.00000000
  M1066a_V%radius_1066a(118) =   5249790.00000000
  M1066a_V%radius_1066a(119) =   5284420.00000000
  M1066a_V%radius_1066a(120) =   5319060.00000000
  M1066a_V%radius_1066a(121) =   5353690.00000000
  M1066a_V%radius_1066a(122) =   5388320.00000000
  M1066a_V%radius_1066a(123) =   5422950.00000000
  M1066a_V%radius_1066a(124) =   5457580.00000000
  M1066a_V%radius_1066a(125) =   5492210.00000000
  M1066a_V%radius_1066a(126) =   5526840.00000000
  M1066a_V%radius_1066a(127) =   5561470.00000000
  M1066a_V%radius_1066a(128) =   5596110.00000000
  M1066a_V%radius_1066a(129) =   5630740.00000000
  M1066a_V%radius_1066a(130) =   5665370.00000000
  M1066a_V%radius_1066a(131) =   5700000.00000000
  M1066a_V%radius_1066a(132) =   5700000.00000000
  M1066a_V%radius_1066a(133) =   5731250.00000000
  M1066a_V%radius_1066a(134) =   5762500.00000000
  M1066a_V%radius_1066a(135) =   5793750.00000000
  M1066a_V%radius_1066a(136) =   5825000.00000000
  M1066a_V%radius_1066a(137) =   5856250.00000000
  M1066a_V%radius_1066a(138) =   5887500.00000000
  M1066a_V%radius_1066a(139) =   5918750.00000000
  M1066a_V%radius_1066a(140) =   5950000.00000000
  M1066a_V%radius_1066a(141) =   5950000.00000000
  M1066a_V%radius_1066a(142) =   5975630.00000000
  M1066a_V%radius_1066a(143) =   6001250.00000000
  M1066a_V%radius_1066a(144) =   6026880.00000000
  M1066a_V%radius_1066a(145) =   6052500.00000000
  M1066a_V%radius_1066a(146) =   6078130.00000000
  M1066a_V%radius_1066a(147) =   6103750.00000000
  M1066a_V%radius_1066a(148) =   6129380.00000000
  M1066a_V%radius_1066a(149) =   6155000.00000000
  M1066a_V%radius_1066a(150) =   6180630.00000000
  M1066a_V%radius_1066a(151) =   6206250.00000000
  M1066a_V%radius_1066a(152) =   6231880.00000000
  M1066a_V%radius_1066a(153) =   6257500.00000000
  M1066a_V%radius_1066a(154) =   6283130.00000000
  M1066a_V%radius_1066a(155) =   6308750.00000000
  M1066a_V%radius_1066a(156) =   6334380.00000000
  M1066a_V%radius_1066a(157) =   6360000.00000000
  M1066a_V%radius_1066a(158) =   6360000.00000000
  M1066a_V%radius_1066a(159) =   6365500.00000000
  M1066a_V%radius_1066a(160) =   6371000.00000000

  M1066a_V%density_1066a(  1) =   13.4290300000000
  M1066a_V%density_1066a(  2) =   13.4256300000000
  M1066a_V%density_1066a(  3) =   13.4191300000000
  M1066a_V%density_1066a(  4) =   13.4135300000000
  M1066a_V%density_1066a(  5) =   13.4072300000000
  M1066a_V%density_1066a(  6) =   13.4003200000000
  M1066a_V%density_1066a(  7) =   13.3929200000000
  M1066a_V%density_1066a(  8) =   13.3847100000000
  M1066a_V%density_1066a(  9) =   13.3754000000000
  M1066a_V%density_1066a( 10) =   13.3649000000000
  M1066a_V%density_1066a( 11) =   13.3527900000000
  M1066a_V%density_1066a( 12) =   13.3389800000000
  M1066a_V%density_1066a( 13) =   13.3238700000000
  M1066a_V%density_1066a( 14) =   13.3078500000000
  M1066a_V%density_1066a( 15) =   13.2914400000000
  M1066a_V%density_1066a( 16) =   13.2750300000000
  M1066a_V%density_1066a( 17) =   13.2589100000000
  M1066a_V%density_1066a( 18) =   13.2431000000000
  M1066a_V%density_1066a( 19) =   13.2275800000000
  M1066a_V%density_1066a( 20) =   13.2123600000000
  M1066a_V%density_1066a( 21) =   13.1972500000000
  M1066a_V%density_1066a( 22) =   13.1823300000000
  M1066a_V%density_1066a( 23) =   13.1675100000000
  M1066a_V%density_1066a( 24) =   13.1527800000000
  M1066a_V%density_1066a( 25) =   13.1382600000000
  M1066a_V%density_1066a( 26) =   13.1239400000000
  M1066a_V%density_1066a( 27) =   13.1095200000000
  M1066a_V%density_1066a( 28) =   13.0953900000000
  M1066a_V%density_1066a( 29) =   13.0811600000000
  M1066a_V%density_1066a( 30) =   13.0670400000000
  M1066a_V%density_1066a( 31) =   13.0525100000000
  M1066a_V%density_1066a( 32) =   13.0385800000000
  M1066a_V%density_1066a( 33) =   13.0287500000000
  M1066a_V%density_1066a( 34) =   12.1606500000000
  M1066a_V%density_1066a( 35) =   12.1169900000000
  M1066a_V%density_1066a( 36) =   12.0748300000000
  M1066a_V%density_1066a( 37) =   12.0330700000000
  M1066a_V%density_1066a( 38) =   11.9916000000000
  M1066a_V%density_1066a( 39) =   11.9507300000000
  M1066a_V%density_1066a( 40) =   11.9104600000000
  M1066a_V%density_1066a( 41) =   11.8693800000000
  M1066a_V%density_1066a( 42) =   11.8248100000000
  M1066a_V%density_1066a( 43) =   11.7753200000000
  M1066a_V%density_1066a( 44) =   11.7220400000000
  M1066a_V%density_1066a( 45) =   11.6665500000000
  M1066a_V%density_1066a( 46) =   11.6085600000000
  M1066a_V%density_1066a( 47) =   11.5469600000000
  M1066a_V%density_1066a( 48) =   11.4809600000000
  M1066a_V%density_1066a( 49) =   11.4116600000000
  M1066a_V%density_1066a( 50) =   11.3411600000000
  M1066a_V%density_1066a( 51) =   11.2705500000000
  M1066a_V%density_1066a( 52) =   11.1982400000000
  M1066a_V%density_1066a( 53) =   11.1214200000000
  M1066a_V%density_1066a( 54) =   11.0384100000000
  M1066a_V%density_1066a( 55) =   10.9511900000000
  M1066a_V%density_1066a( 56) =   10.8631600000000
  M1066a_V%density_1066a( 57) =   10.7770300000000
  M1066a_V%density_1066a( 58) =   10.6925000000000
  M1066a_V%density_1066a( 59) =   10.6076700000000
  M1066a_V%density_1066a( 60) =   10.5207300000000
  M1066a_V%density_1066a( 61) =   10.4312000000000
  M1066a_V%density_1066a( 62) =   10.3377500000000
  M1066a_V%density_1066a( 63) =   10.2396100000000
  M1066a_V%density_1066a( 64) =   10.1378600000000
  M1066a_V%density_1066a( 65) =   10.0323000000000
  M1066a_V%density_1066a( 66) =   9.91745000000000
  M1066a_V%density_1066a( 67) =   5.53205000000000
  M1066a_V%density_1066a( 68) =   5.52147000000000
  M1066a_V%density_1066a( 69) =   5.50959000000000
  M1066a_V%density_1066a( 70) =   5.49821000000000
  M1066a_V%density_1066a( 71) =   5.48673000000000
  M1066a_V%density_1066a( 72) =   5.47495000000000
  M1066a_V%density_1066a( 73) =   5.46297000000000
  M1066a_V%density_1066a( 74) =   5.45049000000000
  M1066a_V%density_1066a( 75) =   5.43741000000000
  M1066a_V%density_1066a( 76) =   5.42382000000000
  M1066a_V%density_1066a( 77) =   5.40934000000000
  M1066a_V%density_1066a( 78) =   5.39375000000000
  M1066a_V%density_1066a( 79) =   5.37717000000000
  M1066a_V%density_1066a( 80) =   5.35958000000000
  M1066a_V%density_1066a( 81) =   5.34079000000000
  M1066a_V%density_1066a( 82) =   5.32100000000000
  M1066a_V%density_1066a( 83) =   5.30031000000000
  M1066a_V%density_1066a( 84) =   5.27902000000000
  M1066a_V%density_1066a( 85) =   5.25733000000000
  M1066a_V%density_1066a( 86) =   5.23554000000000
  M1066a_V%density_1066a( 87) =   5.21375000000000
  M1066a_V%density_1066a( 88) =   5.19196000000000
  M1066a_V%density_1066a( 89) =   5.17056000000000
  M1066a_V%density_1066a( 90) =   5.14937000000000
  M1066a_V%density_1066a( 91) =   5.12827000000000
  M1066a_V%density_1066a( 92) =   5.10758000000000
  M1066a_V%density_1066a( 93) =   5.08728000000000
  M1066a_V%density_1066a( 94) =   5.06738000000000
  M1066a_V%density_1066a( 95) =   5.04769000000000
  M1066a_V%density_1066a( 96) =   5.02809000000000
  M1066a_V%density_1066a( 97) =   5.00869000000000
  M1066a_V%density_1066a( 98) =   4.98929000000000
  M1066a_V%density_1066a( 99) =   4.96968000000000
  M1066a_V%density_1066a(100) =   4.95008000000000
  M1066a_V%density_1066a(101) =   4.93048000000000
  M1066a_V%density_1066a(102) =   4.91128000000000
  M1066a_V%density_1066a(103) =   4.89257000000000
  M1066a_V%density_1066a(104) =   4.87447000000000
  M1066a_V%density_1066a(105) =   4.85716000000000
  M1066a_V%density_1066a(106) =   4.84095000000000
  M1066a_V%density_1066a(107) =   4.82554000000000
  M1066a_V%density_1066a(108) =   4.81084000000000
  M1066a_V%density_1066a(109) =   4.79683000000000
  M1066a_V%density_1066a(110) =   4.78312000000000
  M1066a_V%density_1066a(111) =   4.76951000000000
  M1066a_V%density_1066a(112) =   4.75530000000000
  M1066a_V%density_1066a(113) =   4.74008000000000
  M1066a_V%density_1066a(114) =   4.72317000000000
  M1066a_V%density_1066a(115) =   4.70426000000000
  M1066a_V%density_1066a(116) =   4.68264000000000
  M1066a_V%density_1066a(117) =   4.65863000000000
  M1066a_V%density_1066a(118) =   4.63351000000000
  M1066a_V%density_1066a(119) =   4.60859000000000
  M1066a_V%density_1066a(120) =   4.58538000000000
  M1066a_V%density_1066a(121) =   4.56536000000000
  M1066a_V%density_1066a(122) =   4.55044000000000
  M1066a_V%density_1066a(123) =   4.54072000000000
  M1066a_V%density_1066a(124) =   4.53480000000000
  M1066a_V%density_1066a(125) =   4.53478000000000
  M1066a_V%density_1066a(126) =   4.53275000000000
  M1066a_V%density_1066a(127) =   4.50893000000000
  M1066a_V%density_1066a(128) =   4.46541000000000
  M1066a_V%density_1066a(129) =   4.40098000000000
  M1066a_V%density_1066a(130) =   4.31686000000000
  M1066a_V%density_1066a(131) =   4.20553000000000
  M1066a_V%density_1066a(132) =   4.20553000000000
  M1066a_V%density_1066a(133) =   4.10272000000000
  M1066a_V%density_1066a(134) =   4.02250000000000
  M1066a_V%density_1066a(135) =   3.95789000000000
  M1066a_V%density_1066a(136) =   3.89997000000000
  M1066a_V%density_1066a(137) =   3.84675000000000
  M1066a_V%density_1066a(138) =   3.80144000000000
  M1066a_V%density_1066a(139) =   3.76072000000000
  M1066a_V%density_1066a(140) =   3.70840000000000
  M1066a_V%density_1066a(141) =   3.70840000000000
  M1066a_V%density_1066a(142) =   3.65370000000000
  M1066a_V%density_1066a(143) =   3.59640000000000
  M1066a_V%density_1066a(144) =   3.54731000000000
  M1066a_V%density_1066a(145) =   3.50511000000000
  M1066a_V%density_1066a(146) =   3.46861000000000
  M1066a_V%density_1066a(147) =   3.43851000000000
  M1066a_V%density_1066a(148) =   3.41471000000000
  M1066a_V%density_1066a(149) =   3.39751000000000
  M1066a_V%density_1066a(150) =   3.38820000000000
  M1066a_V%density_1066a(151) =   3.38200000000000
  M1066a_V%density_1066a(152) =   3.37450000000000
  M1066a_V%density_1066a(153) =   3.36710000000000
  M1066a_V%density_1066a(154) =   3.35980000000000
  M1066a_V%density_1066a(155) =   3.35259000000000
  M1066a_V%density_1066a(156) =   3.34549000000000
  M1066a_V%density_1066a(157) =   3.33828000000000
  M1066a_V%density_1066a(158) =   2.17798000000000
  M1066a_V%density_1066a(159) =   2.17766000000000
  M1066a_V%density_1066a(160) =   2.17734000000000

  M1066a_V%vp_1066a(  1) =   11.3383000000000
  M1066a_V%vp_1066a(  2) =   11.3374000000000
  M1066a_V%vp_1066a(  3) =   11.3347000000000
  M1066a_V%vp_1066a(  4) =   11.3301000000000
  M1066a_V%vp_1066a(  5) =   11.3237000000000
  M1066a_V%vp_1066a(  6) =   11.3155000000000
  M1066a_V%vp_1066a(  7) =   11.3056000000000
  M1066a_V%vp_1066a(  8) =   11.2940000000000
  M1066a_V%vp_1066a(  9) =   11.2810000000000
  M1066a_V%vp_1066a( 10) =   11.2666000000000
  M1066a_V%vp_1066a( 11) =   11.2512000000000
  M1066a_V%vp_1066a( 12) =   11.2349000000000
  M1066a_V%vp_1066a( 13) =   11.2181000000000
  M1066a_V%vp_1066a( 14) =   11.2010000000000
  M1066a_V%vp_1066a( 15) =   11.1840000000000
  M1066a_V%vp_1066a( 16) =   11.1672000000000
  M1066a_V%vp_1066a( 17) =   11.1508000000000
  M1066a_V%vp_1066a( 18) =   11.1351000000000
  M1066a_V%vp_1066a( 19) =   11.1201000000000
  M1066a_V%vp_1066a( 20) =   11.1059000000000
  M1066a_V%vp_1066a( 21) =   11.0924000000000
  M1066a_V%vp_1066a( 22) =   11.0798000000000
  M1066a_V%vp_1066a( 23) =   11.0678000000000
  M1066a_V%vp_1066a( 24) =   11.0564000000000
  M1066a_V%vp_1066a( 25) =   11.0455000000000
  M1066a_V%vp_1066a( 26) =   11.0350000000000
  M1066a_V%vp_1066a( 27) =   11.0248000000000
  M1066a_V%vp_1066a( 28) =   11.0149000000000
  M1066a_V%vp_1066a( 29) =   11.0051000000000
  M1066a_V%vp_1066a( 30) =   10.9953000000000
  M1066a_V%vp_1066a( 31) =   10.9857000000000
  M1066a_V%vp_1066a( 32) =   10.9756000000000
  M1066a_V%vp_1066a( 33) =   10.9687000000000
  M1066a_V%vp_1066a( 34) =   10.4140000000000
  M1066a_V%vp_1066a( 35) =   10.3518000000000
  M1066a_V%vp_1066a( 36) =   10.2922000000000
  M1066a_V%vp_1066a( 37) =   10.2351000000000
  M1066a_V%vp_1066a( 38) =   10.1808000000000
  M1066a_V%vp_1066a( 39) =   10.1297000000000
  M1066a_V%vp_1066a( 40) =   10.0788000000000
  M1066a_V%vp_1066a( 41) =   10.0284000000000
  M1066a_V%vp_1066a( 42) =   9.97880000000000
  M1066a_V%vp_1066a( 43) =   9.93070000000000
  M1066a_V%vp_1066a( 44) =   9.88360000000000
  M1066a_V%vp_1066a( 45) =   9.83530000000000
  M1066a_V%vp_1066a( 46) =   9.78250000000000
  M1066a_V%vp_1066a( 47) =   9.72110000000000
  M1066a_V%vp_1066a( 48) =   9.65210000000000
  M1066a_V%vp_1066a( 49) =   9.58060000000000
  M1066a_V%vp_1066a( 50) =   9.51150000000000
  M1066a_V%vp_1066a( 51) =   9.44650000000000
  M1066a_V%vp_1066a( 52) =   9.38280000000000
  M1066a_V%vp_1066a( 53) =   9.31660000000000
  M1066a_V%vp_1066a( 54) =   9.24420000000000
  M1066a_V%vp_1066a( 55) =   9.16580000000000
  M1066a_V%vp_1066a( 56) =   9.08330000000000
  M1066a_V%vp_1066a( 57) =   8.99870000000000
  M1066a_V%vp_1066a( 58) =   8.91160000000000
  M1066a_V%vp_1066a( 59) =   8.82010000000000
  M1066a_V%vp_1066a( 60) =   8.72230000000000
  M1066a_V%vp_1066a( 61) =   8.61710000000000
  M1066a_V%vp_1066a( 62) =   8.50300000000000
  M1066a_V%vp_1066a( 63) =   8.38070000000000
  M1066a_V%vp_1066a( 64) =   8.25560000000000
  M1066a_V%vp_1066a( 65) =   8.13180000000000
  M1066a_V%vp_1066a( 66) =   8.01120000000000
  M1066a_V%vp_1066a( 67) =   13.7172000000000
  M1066a_V%vp_1066a( 68) =   13.7134000000000
  M1066a_V%vp_1066a( 69) =   13.7089000000000
  M1066a_V%vp_1066a( 70) =   13.6806000000000
  M1066a_V%vp_1066a( 71) =   13.6517000000000
  M1066a_V%vp_1066a( 72) =   13.6251000000000
  M1066a_V%vp_1066a( 73) =   13.5916000000000
  M1066a_V%vp_1066a( 74) =   13.5564000000000
  M1066a_V%vp_1066a( 75) =   13.5165000000000
  M1066a_V%vp_1066a( 76) =   13.4725000000000
  M1066a_V%vp_1066a( 77) =   13.4248000000000
  M1066a_V%vp_1066a( 78) =   13.3742000000000
  M1066a_V%vp_1066a( 79) =   13.3216000000000
  M1066a_V%vp_1066a( 80) =   13.2679000000000
  M1066a_V%vp_1066a( 81) =   13.2142000000000
  M1066a_V%vp_1066a( 82) =   13.1619000000000
  M1066a_V%vp_1066a( 83) =   13.1114000000000
  M1066a_V%vp_1066a( 84) =   13.0631000000000
  M1066a_V%vp_1066a( 85) =   13.0174000000000
  M1066a_V%vp_1066a( 86) =   12.9745000000000
  M1066a_V%vp_1066a( 87) =   12.9346000000000
  M1066a_V%vp_1066a( 88) =   12.8977000000000
  M1066a_V%vp_1066a( 89) =   12.8635000000000
  M1066a_V%vp_1066a( 90) =   12.8318000000000
  M1066a_V%vp_1066a( 91) =   12.8022000000000
  M1066a_V%vp_1066a( 92) =   12.7739000000000
  M1066a_V%vp_1066a( 93) =   12.7463000000000
  M1066a_V%vp_1066a( 94) =   12.7186000000000
  M1066a_V%vp_1066a( 95) =   12.6903000000000
  M1066a_V%vp_1066a( 96) =   12.6610000000000
  M1066a_V%vp_1066a( 97) =   12.6302000000000
  M1066a_V%vp_1066a( 98) =   12.5978000000000
  M1066a_V%vp_1066a( 99) =   12.5637000000000
  M1066a_V%vp_1066a(100) =   12.5276000000000
  M1066a_V%vp_1066a(101) =   12.4893000000000
  M1066a_V%vp_1066a(102) =   12.4485000000000
  M1066a_V%vp_1066a(103) =   12.4052000000000
  M1066a_V%vp_1066a(104) =   12.3592000000000
  M1066a_V%vp_1066a(105) =   12.3105000000000
  M1066a_V%vp_1066a(106) =   12.2596000000000
  M1066a_V%vp_1066a(107) =   12.2072000000000
  M1066a_V%vp_1066a(108) =   12.1538000000000
  M1066a_V%vp_1066a(109) =   12.0998000000000
  M1066a_V%vp_1066a(110) =   12.0458000000000
  M1066a_V%vp_1066a(111) =   11.9920000000000
  M1066a_V%vp_1066a(112) =   11.9373000000000
  M1066a_V%vp_1066a(113) =   11.8804000000000
  M1066a_V%vp_1066a(114) =   11.8200000000000
  M1066a_V%vp_1066a(115) =   11.7554000000000
  M1066a_V%vp_1066a(116) =   11.6844000000000
  M1066a_V%vp_1066a(117) =   11.6079000000000
  M1066a_V%vp_1066a(118) =   11.5308000000000
  M1066a_V%vp_1066a(119) =   11.4579000000000
  M1066a_V%vp_1066a(120) =   11.3935000000000
  M1066a_V%vp_1066a(121) =   11.3418000000000
  M1066a_V%vp_1066a(122) =   11.3085000000000
  M1066a_V%vp_1066a(123) =   11.2938000000000
  M1066a_V%vp_1066a(124) =   11.2915000000000
  M1066a_V%vp_1066a(125) =   11.3049000000000
  M1066a_V%vp_1066a(126) =   11.3123000000000
  M1066a_V%vp_1066a(127) =   11.2643000000000
  M1066a_V%vp_1066a(128) =   11.1635000000000
  M1066a_V%vp_1066a(129) =   11.0063000000000
  M1066a_V%vp_1066a(130) =   10.7959000000000
  M1066a_V%vp_1066a(131) =   10.5143000000000
  M1066a_V%vp_1066a(132) =   10.5143000000000
  M1066a_V%vp_1066a(133) =   10.2513000000000
  M1066a_V%vp_1066a(134) =   10.0402000000000
  M1066a_V%vp_1066a(135) =   9.86480000000000
  M1066a_V%vp_1066a(136) =   9.70860000000000
  M1066a_V%vp_1066a(137) =   9.56810000000000
  M1066a_V%vp_1066a(138) =   9.45120000000000
  M1066a_V%vp_1066a(139) =   9.35100000000000
  M1066a_V%vp_1066a(140) =   9.22830000000000
  M1066a_V%vp_1066a(141) =   9.22830000000000
  M1066a_V%vp_1066a(142) =   9.10870000000000
  M1066a_V%vp_1066a(143) =   8.98230000000000
  M1066a_V%vp_1066a(144) =   8.85920000000000
  M1066a_V%vp_1066a(145) =   8.73860000000000
  M1066a_V%vp_1066a(146) =   8.61930000000000
  M1066a_V%vp_1066a(147) =   8.50180000000000
  M1066a_V%vp_1066a(148) =   8.38710000000000
  M1066a_V%vp_1066a(149) =   8.27360000000000
  M1066a_V%vp_1066a(150) =   8.15850000000000
  M1066a_V%vp_1066a(151) =   8.05400000000000
  M1066a_V%vp_1066a(152) =   7.96520000000000
  M1066a_V%vp_1066a(153) =   7.87340000000000
  M1066a_V%vp_1066a(154) =   7.79720000000000
  M1066a_V%vp_1066a(155) =   7.73910000000000
  M1066a_V%vp_1066a(156) =   7.71340000000000
  M1066a_V%vp_1066a(157) =   7.70460000000000
  M1066a_V%vp_1066a(158) =   4.70220000000000
  M1066a_V%vp_1066a(159) =   4.70010000000000
  M1066a_V%vp_1066a(160) =   4.69790000000000

  M1066a_V%vs_1066a(  1) =   3.62980000000000
  M1066a_V%vs_1066a(  2) =   3.62970000000000
  M1066a_V%vs_1066a(  3) =   3.62940000000000
  M1066a_V%vs_1066a(  4) =   3.62880000000000
  M1066a_V%vs_1066a(  5) =   3.62810000000000
  M1066a_V%vs_1066a(  6) =   3.62710000000000
  M1066a_V%vs_1066a(  7) =   3.62590000000000
  M1066a_V%vs_1066a(  8) =   3.62440000000000
  M1066a_V%vs_1066a(  9) =   3.62280000000000
  M1066a_V%vs_1066a( 10) =   3.62090000000000
  M1066a_V%vs_1066a( 11) =   3.61870000000000
  M1066a_V%vs_1066a( 12) =   3.61630000000000
  M1066a_V%vs_1066a( 13) =   3.61370000000000
  M1066a_V%vs_1066a( 14) =   3.61080000000000
  M1066a_V%vs_1066a( 15) =   3.60760000000000
  M1066a_V%vs_1066a( 16) =   3.60420000000000
  M1066a_V%vs_1066a( 17) =   3.60040000000000
  M1066a_V%vs_1066a( 18) =   3.59650000000000
  M1066a_V%vs_1066a( 19) =   3.59220000000000
  M1066a_V%vs_1066a( 20) =   3.58760000000000
  M1066a_V%vs_1066a( 21) =   3.58280000000000
  M1066a_V%vs_1066a( 22) =   3.57770000000000
  M1066a_V%vs_1066a( 23) =   3.57240000000000
  M1066a_V%vs_1066a( 24) =   3.56680000000000
  M1066a_V%vs_1066a( 25) =   3.56100000000000
  M1066a_V%vs_1066a( 26) =   3.55510000000000
  M1066a_V%vs_1066a( 27) =   3.54900000000000
  M1066a_V%vs_1066a( 28) =   3.54280000000000
  M1066a_V%vs_1066a( 29) =   3.53650000000000
  M1066a_V%vs_1066a( 30) =   3.53010000000000
  M1066a_V%vs_1066a( 31) =   3.52380000000000
  M1066a_V%vs_1066a( 32) =   3.51720000000000
  M1066a_V%vs_1066a( 33) =   3.51180000000000
  M1066a_V%vs_1066a( 34) =  0.000000000000000
  M1066a_V%vs_1066a( 35) =  0.000000000000000
  M1066a_V%vs_1066a( 36) =  0.000000000000000
  M1066a_V%vs_1066a( 37) =  0.000000000000000
  M1066a_V%vs_1066a( 38) =  0.000000000000000
  M1066a_V%vs_1066a( 39) =  0.000000000000000
  M1066a_V%vs_1066a( 40) =  0.000000000000000
  M1066a_V%vs_1066a( 41) =  0.000000000000000
  M1066a_V%vs_1066a( 42) =  0.000000000000000
  M1066a_V%vs_1066a( 43) =  0.000000000000000
  M1066a_V%vs_1066a( 44) =  0.000000000000000
  M1066a_V%vs_1066a( 45) =  0.000000000000000
  M1066a_V%vs_1066a( 46) =  0.000000000000000
  M1066a_V%vs_1066a( 47) =  0.000000000000000
  M1066a_V%vs_1066a( 48) =  0.000000000000000
  M1066a_V%vs_1066a( 49) =  0.000000000000000
  M1066a_V%vs_1066a( 50) =  0.000000000000000
  M1066a_V%vs_1066a( 51) =  0.000000000000000
  M1066a_V%vs_1066a( 52) =  0.000000000000000
  M1066a_V%vs_1066a( 53) =  0.000000000000000
  M1066a_V%vs_1066a( 54) =  0.000000000000000
  M1066a_V%vs_1066a( 55) =  0.000000000000000
  M1066a_V%vs_1066a( 56) =  0.000000000000000
  M1066a_V%vs_1066a( 57) =  0.000000000000000
  M1066a_V%vs_1066a( 58) =  0.000000000000000
  M1066a_V%vs_1066a( 59) =  0.000000000000000
  M1066a_V%vs_1066a( 60) =  0.000000000000000
  M1066a_V%vs_1066a( 61) =  0.000000000000000
  M1066a_V%vs_1066a( 62) =  0.000000000000000
  M1066a_V%vs_1066a( 63) =  0.000000000000000
  M1066a_V%vs_1066a( 64) =  0.000000000000000
  M1066a_V%vs_1066a( 65) =  0.000000000000000
  M1066a_V%vs_1066a( 66) =  0.000000000000000
  M1066a_V%vs_1066a( 67) =   7.24980000000000
  M1066a_V%vs_1066a( 68) =   7.23760000000000
  M1066a_V%vs_1066a( 69) =   7.22390000000000
  M1066a_V%vs_1066a( 70) =   7.21000000000000
  M1066a_V%vs_1066a( 71) =   7.19640000000000
  M1066a_V%vs_1066a( 72) =   7.18300000000000
  M1066a_V%vs_1066a( 73) =   7.16990000000000
  M1066a_V%vs_1066a( 74) =   7.15710000000000
  M1066a_V%vs_1066a( 75) =   7.14450000000000
  M1066a_V%vs_1066a( 76) =   7.13200000000000
  M1066a_V%vs_1066a( 77) =   7.11960000000000
  M1066a_V%vs_1066a( 78) =   7.10740000000000
  M1066a_V%vs_1066a( 79) =   7.09530000000000
  M1066a_V%vs_1066a( 80) =   7.08320000000000
  M1066a_V%vs_1066a( 81) =   7.07120000000000
  M1066a_V%vs_1066a( 82) =   7.05920000000000
  M1066a_V%vs_1066a( 83) =   7.04710000000000
  M1066a_V%vs_1066a( 84) =   7.03470000000000
  M1066a_V%vs_1066a( 85) =   7.02190000000000
  M1066a_V%vs_1066a( 86) =   7.00860000000000
  M1066a_V%vs_1066a( 87) =   6.99470000000000
  M1066a_V%vs_1066a( 88) =   6.98030000000000
  M1066a_V%vs_1066a( 89) =   6.96510000000000
  M1066a_V%vs_1066a( 90) =   6.94930000000000
  M1066a_V%vs_1066a( 91) =   6.93290000000000
  M1066a_V%vs_1066a( 92) =   6.91620000000000
  M1066a_V%vs_1066a( 93) =   6.89910000000000
  M1066a_V%vs_1066a( 94) =   6.88200000000000
  M1066a_V%vs_1066a( 95) =   6.86520000000000
  M1066a_V%vs_1066a( 96) =   6.84900000000000
  M1066a_V%vs_1066a( 97) =   6.83340000000000
  M1066a_V%vs_1066a( 98) =   6.81820000000000
  M1066a_V%vs_1066a( 99) =   6.80360000000000
  M1066a_V%vs_1066a(100) =   6.78910000000000
  M1066a_V%vs_1066a(101) =   6.77440000000000
  M1066a_V%vs_1066a(102) =   6.75890000000000
  M1066a_V%vs_1066a(103) =   6.74270000000000
  M1066a_V%vs_1066a(104) =   6.72550000000000
  M1066a_V%vs_1066a(105) =   6.70730000000000
  M1066a_V%vs_1066a(106) =   6.68810000000000
  M1066a_V%vs_1066a(107) =   6.66840000000000
  M1066a_V%vs_1066a(108) =   6.64850000000000
  M1066a_V%vs_1066a(109) =   6.62880000000000
  M1066a_V%vs_1066a(110) =   6.60950000000000
  M1066a_V%vs_1066a(111) =   6.59110000000000
  M1066a_V%vs_1066a(112) =   6.57310000000000
  M1066a_V%vs_1066a(113) =   6.55480000000000
  M1066a_V%vs_1066a(114) =   6.53510000000000
  M1066a_V%vs_1066a(115) =   6.51330000000000
  M1066a_V%vs_1066a(116) =   6.48810000000000
  M1066a_V%vs_1066a(117) =   6.45940000000000
  M1066a_V%vs_1066a(118) =   6.42860000000000
  M1066a_V%vs_1066a(119) =   6.39760000000000
  M1066a_V%vs_1066a(120) =   6.36840000000000
  M1066a_V%vs_1066a(121) =   6.34280000000000
  M1066a_V%vs_1066a(122) =   6.32350000000000
  M1066a_V%vs_1066a(123) =   6.31140000000000
  M1066a_V%vs_1066a(124) =   6.30410000000000
  M1066a_V%vs_1066a(125) =   6.30520000000000
  M1066a_V%vs_1066a(126) =   6.30210000000000
  M1066a_V%vs_1066a(127) =   6.26430000000000
  M1066a_V%vs_1066a(128) =   6.19470000000000
  M1066a_V%vs_1066a(129) =   6.09120000000000
  M1066a_V%vs_1066a(130) =   5.95550000000000
  M1066a_V%vs_1066a(131) =   5.77550000000000
  M1066a_V%vs_1066a(132) =   5.77550000000000
  M1066a_V%vs_1066a(133) =   5.60830000000000
  M1066a_V%vs_1066a(134) =   5.47520000000000
  M1066a_V%vs_1066a(135) =   5.36530000000000
  M1066a_V%vs_1066a(136) =   5.26650000000000
  M1066a_V%vs_1066a(137) =   5.17620000000000
  M1066a_V%vs_1066a(138) =   5.09960000000000
  M1066a_V%vs_1066a(139) =   5.03220000000000
  M1066a_V%vs_1066a(140) =   4.94880000000000
  M1066a_V%vs_1066a(141) =   4.94880000000000
  M1066a_V%vs_1066a(142) =   4.86670000000000
  M1066a_V%vs_1066a(143) =   4.78060000000000
  M1066a_V%vs_1066a(144) =   4.69950000000000
  M1066a_V%vs_1066a(145) =   4.62110000000000
  M1066a_V%vs_1066a(146) =   4.54790000000000
  M1066a_V%vs_1066a(147) =   4.48820000000000
  M1066a_V%vs_1066a(148) =   4.44210000000000
  M1066a_V%vs_1066a(149) =   4.40840000000000
  M1066a_V%vs_1066a(150) =   4.38740000000000
  M1066a_V%vs_1066a(151) =   4.37950000000000
  M1066a_V%vs_1066a(152) =   4.39040000000000
  M1066a_V%vs_1066a(153) =   4.43310000000000
  M1066a_V%vs_1066a(154) =   4.48300000000000
  M1066a_V%vs_1066a(155) =   4.53890000000000
  M1066a_V%vs_1066a(156) =   4.60400000000000
  M1066a_V%vs_1066a(157) =   4.64870000000000
  M1066a_V%vs_1066a(158) =   2.58060000000000
  M1066a_V%vs_1066a(159) =   2.58140000000000
  M1066a_V%vs_1066a(160) =   2.58220000000000

  if (SUPPRESS_CRUSTAL_MESH) then
    M1066a_V%vp_1066a(158:160) = M1066a_V%vp_1066a(157)
    M1066a_V%vs_1066a(158:160) = M1066a_V%vs_1066a(157)
    M1066a_V%density_1066a(158:160) = M1066a_V%density_1066a(157)
  endif

  M1066a_V%Qkappa_1066a(  1) =   156900.000000000
  M1066a_V%Qkappa_1066a(  2) =   156900.000000000
  M1066a_V%Qkappa_1066a(  3) =   156900.000000000
  M1066a_V%Qkappa_1066a(  4) =   156900.000000000
  M1066a_V%Qkappa_1066a(  5) =   156900.000000000
  M1066a_V%Qkappa_1066a(  6) =   156900.000000000
  M1066a_V%Qkappa_1066a(  7) =   156900.000000000
  M1066a_V%Qkappa_1066a(  8) =   156900.000000000
  M1066a_V%Qkappa_1066a(  9) =   156900.000000000
  M1066a_V%Qkappa_1066a( 10) =   156900.000000000
  M1066a_V%Qkappa_1066a( 11) =   156900.000000000
  M1066a_V%Qkappa_1066a( 12) =   156900.000000000
  M1066a_V%Qkappa_1066a( 13) =   156900.000000000
  M1066a_V%Qkappa_1066a( 14) =   156900.000000000
  M1066a_V%Qkappa_1066a( 15) =   156900.000000000
  M1066a_V%Qkappa_1066a( 16) =   156900.000000000
  M1066a_V%Qkappa_1066a( 17) =   156900.000000000
  M1066a_V%Qkappa_1066a( 18) =   156900.000000000
  M1066a_V%Qkappa_1066a( 19) =   156900.000000000
  M1066a_V%Qkappa_1066a( 20) =   156900.000000000
  M1066a_V%Qkappa_1066a( 21) =   156900.000000000
  M1066a_V%Qkappa_1066a( 22) =   156900.000000000
  M1066a_V%Qkappa_1066a( 23) =   156900.000000000
  M1066a_V%Qkappa_1066a( 24) =   156900.000000000
  M1066a_V%Qkappa_1066a( 25) =   156900.000000000
  M1066a_V%Qkappa_1066a( 26) =   156900.000000000
  M1066a_V%Qkappa_1066a( 27) =   156900.000000000
  M1066a_V%Qkappa_1066a( 28) =   156900.000000000
  M1066a_V%Qkappa_1066a( 29) =   156900.000000000
  M1066a_V%Qkappa_1066a( 30) =   156900.000000000
  M1066a_V%Qkappa_1066a( 31) =   156900.000000000
  M1066a_V%Qkappa_1066a( 32) =   156900.000000000
  M1066a_V%Qkappa_1066a( 33) =   156900.000000000
  M1066a_V%Qkappa_1066a( 34) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 35) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 36) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 37) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 38) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 39) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 40) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 41) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 42) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 43) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 44) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 45) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 46) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 47) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 48) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 49) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 50) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 51) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 52) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 53) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 54) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 55) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 56) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 57) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 58) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 59) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 60) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 61) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 62) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 63) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 64) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 65) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 66) =  0.000000000000000
  M1066a_V%Qkappa_1066a( 67) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 68) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 69) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 70) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 71) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 72) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 73) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 74) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 75) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 76) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 77) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 78) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 79) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 80) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 81) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 82) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 83) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 84) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 85) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 86) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 87) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 88) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 89) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 90) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 91) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 92) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 93) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 94) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 95) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 96) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 97) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 98) =   16600.0000000000
  M1066a_V%Qkappa_1066a( 99) =   16600.0000000000
  M1066a_V%Qkappa_1066a(100) =   16600.0000000000
  M1066a_V%Qkappa_1066a(101) =   16600.0000000000
  M1066a_V%Qkappa_1066a(102) =   16600.0000000000
  M1066a_V%Qkappa_1066a(103) =   16600.0000000000
  M1066a_V%Qkappa_1066a(104) =   16600.0000000000
  M1066a_V%Qkappa_1066a(105) =   16600.0000000000
  M1066a_V%Qkappa_1066a(106) =   16600.0000000000
  M1066a_V%Qkappa_1066a(107) =   16600.0000000000
  M1066a_V%Qkappa_1066a(108) =   16600.0000000000
  M1066a_V%Qkappa_1066a(109) =   16600.0000000000
  M1066a_V%Qkappa_1066a(110) =   16600.0000000000
  M1066a_V%Qkappa_1066a(111) =   16600.0000000000
  M1066a_V%Qkappa_1066a(112) =   16600.0000000000
  M1066a_V%Qkappa_1066a(113) =   16600.0000000000
  M1066a_V%Qkappa_1066a(114) =   16600.0000000000
  M1066a_V%Qkappa_1066a(115) =   16600.0000000000
  M1066a_V%Qkappa_1066a(116) =   16600.0000000000
  M1066a_V%Qkappa_1066a(117) =   16600.0000000000
  M1066a_V%Qkappa_1066a(118) =   16600.0000000000
  M1066a_V%Qkappa_1066a(119) =   16600.0000000000
  M1066a_V%Qkappa_1066a(120) =   16600.0000000000
  M1066a_V%Qkappa_1066a(121) =   16600.0000000000
  M1066a_V%Qkappa_1066a(122) =   16600.0000000000
  M1066a_V%Qkappa_1066a(123) =   16600.0000000000
  M1066a_V%Qkappa_1066a(124) =   16600.0000000000
  M1066a_V%Qkappa_1066a(125) =   16600.0000000000
  M1066a_V%Qkappa_1066a(126) =   16600.0000000000
  M1066a_V%Qkappa_1066a(127) =   16600.0000000000
  M1066a_V%Qkappa_1066a(128) =   16600.0000000000
  M1066a_V%Qkappa_1066a(129) =   16600.0000000000
  M1066a_V%Qkappa_1066a(130) =   16600.0000000000
  M1066a_V%Qkappa_1066a(131) =   16600.0000000000
  M1066a_V%Qkappa_1066a(132) =   13840.0000000000
  M1066a_V%Qkappa_1066a(133) =   13840.0000000000
  M1066a_V%Qkappa_1066a(134) =   13840.0000000000
  M1066a_V%Qkappa_1066a(135) =   13840.0000000000
  M1066a_V%Qkappa_1066a(136) =   13840.0000000000
  M1066a_V%Qkappa_1066a(137) =   13840.0000000000
  M1066a_V%Qkappa_1066a(138) =   13840.0000000000
  M1066a_V%Qkappa_1066a(139) =   13840.0000000000
  M1066a_V%Qkappa_1066a(140) =   13840.0000000000
  M1066a_V%Qkappa_1066a(141) =   5893.00000000000
  M1066a_V%Qkappa_1066a(142) =   5893.00000000000
  M1066a_V%Qkappa_1066a(143) =   5893.00000000000
  M1066a_V%Qkappa_1066a(144) =   5893.00000000000
  M1066a_V%Qkappa_1066a(145) =   5893.00000000000
  M1066a_V%Qkappa_1066a(146) =   5893.00000000000
  M1066a_V%Qkappa_1066a(147) =   5893.00000000000
  M1066a_V%Qkappa_1066a(148) =   5893.00000000000
  M1066a_V%Qkappa_1066a(149) =   5893.00000000000
  M1066a_V%Qkappa_1066a(150) =   5893.00000000000
  M1066a_V%Qkappa_1066a(151) =   5893.00000000000
  M1066a_V%Qkappa_1066a(152) =   5893.00000000000
  M1066a_V%Qkappa_1066a(153) =   5893.00000000000
  M1066a_V%Qkappa_1066a(154) =   5893.00000000000
  M1066a_V%Qkappa_1066a(155) =   5893.00000000000
  M1066a_V%Qkappa_1066a(156) =   5893.00000000000
  M1066a_V%Qkappa_1066a(157) =   5893.00000000000
  M1066a_V%Qkappa_1066a(158) =   5893.00000000000
  M1066a_V%Qkappa_1066a(159) =   5893.00000000000
  M1066a_V%Qkappa_1066a(160) =   5893.00000000000

  M1066a_V%Qmu_1066a(  1) =   3138.00000000000
  M1066a_V%Qmu_1066a(  2) =   3138.00000000000
  M1066a_V%Qmu_1066a(  3) =   3138.00000000000
  M1066a_V%Qmu_1066a(  4) =   3138.00000000000
  M1066a_V%Qmu_1066a(  5) =   3138.00000000000
  M1066a_V%Qmu_1066a(  6) =   3138.00000000000
  M1066a_V%Qmu_1066a(  7) =   3138.00000000000
  M1066a_V%Qmu_1066a(  8) =   3138.00000000000
  M1066a_V%Qmu_1066a(  9) =   3138.00000000000
  M1066a_V%Qmu_1066a( 10) =   3138.00000000000
  M1066a_V%Qmu_1066a( 11) =   3138.00000000000
  M1066a_V%Qmu_1066a( 12) =   3138.00000000000
  M1066a_V%Qmu_1066a( 13) =   3138.00000000000
  M1066a_V%Qmu_1066a( 14) =   3138.00000000000
  M1066a_V%Qmu_1066a( 15) =   3138.00000000000
  M1066a_V%Qmu_1066a( 16) =   3138.00000000000
  M1066a_V%Qmu_1066a( 17) =   3138.00000000000
  M1066a_V%Qmu_1066a( 18) =   3138.00000000000
  M1066a_V%Qmu_1066a( 19) =   3138.00000000000
  M1066a_V%Qmu_1066a( 20) =   3138.00000000000
  M1066a_V%Qmu_1066a( 21) =   3138.00000000000
  M1066a_V%Qmu_1066a( 22) =   3138.00000000000
  M1066a_V%Qmu_1066a( 23) =   3138.00000000000
  M1066a_V%Qmu_1066a( 24) =   3138.00000000000
  M1066a_V%Qmu_1066a( 25) =   3138.00000000000
  M1066a_V%Qmu_1066a( 26) =   3138.00000000000
  M1066a_V%Qmu_1066a( 27) =   3138.00000000000
  M1066a_V%Qmu_1066a( 28) =   3138.00000000000
  M1066a_V%Qmu_1066a( 29) =   3138.00000000000
  M1066a_V%Qmu_1066a( 30) =   3138.00000000000
  M1066a_V%Qmu_1066a( 31) =   3138.00000000000
  M1066a_V%Qmu_1066a( 32) =   3138.00000000000
  M1066a_V%Qmu_1066a( 33) =   3138.00000000000
  M1066a_V%Qmu_1066a( 34) =  0.000000000000000
  M1066a_V%Qmu_1066a( 35) =  0.000000000000000
  M1066a_V%Qmu_1066a( 36) =  0.000000000000000
  M1066a_V%Qmu_1066a( 37) =  0.000000000000000
  M1066a_V%Qmu_1066a( 38) =  0.000000000000000
  M1066a_V%Qmu_1066a( 39) =  0.000000000000000
  M1066a_V%Qmu_1066a( 40) =  0.000000000000000
  M1066a_V%Qmu_1066a( 41) =  0.000000000000000
  M1066a_V%Qmu_1066a( 42) =  0.000000000000000
  M1066a_V%Qmu_1066a( 43) =  0.000000000000000
  M1066a_V%Qmu_1066a( 44) =  0.000000000000000
  M1066a_V%Qmu_1066a( 45) =  0.000000000000000
  M1066a_V%Qmu_1066a( 46) =  0.000000000000000
  M1066a_V%Qmu_1066a( 47) =  0.000000000000000
  M1066a_V%Qmu_1066a( 48) =  0.000000000000000
  M1066a_V%Qmu_1066a( 49) =  0.000000000000000
  M1066a_V%Qmu_1066a( 50) =  0.000000000000000
  M1066a_V%Qmu_1066a( 51) =  0.000000000000000
  M1066a_V%Qmu_1066a( 52) =  0.000000000000000
  M1066a_V%Qmu_1066a( 53) =  0.000000000000000
  M1066a_V%Qmu_1066a( 54) =  0.000000000000000
  M1066a_V%Qmu_1066a( 55) =  0.000000000000000
  M1066a_V%Qmu_1066a( 56) =  0.000000000000000
  M1066a_V%Qmu_1066a( 57) =  0.000000000000000
  M1066a_V%Qmu_1066a( 58) =  0.000000000000000
  M1066a_V%Qmu_1066a( 59) =  0.000000000000000
  M1066a_V%Qmu_1066a( 60) =  0.000000000000000
  M1066a_V%Qmu_1066a( 61) =  0.000000000000000
  M1066a_V%Qmu_1066a( 62) =  0.000000000000000
  M1066a_V%Qmu_1066a( 63) =  0.000000000000000
  M1066a_V%Qmu_1066a( 64) =  0.000000000000000
  M1066a_V%Qmu_1066a( 65) =  0.000000000000000
  M1066a_V%Qmu_1066a( 66) =  0.000000000000000
  M1066a_V%Qmu_1066a( 67) =   332.000000000000
  M1066a_V%Qmu_1066a( 68) =   332.000000000000
  M1066a_V%Qmu_1066a( 69) =   332.000000000000
  M1066a_V%Qmu_1066a( 70) =   332.000000000000
  M1066a_V%Qmu_1066a( 71) =   332.000000000000
  M1066a_V%Qmu_1066a( 72) =   332.000000000000
  M1066a_V%Qmu_1066a( 73) =   332.000000000000
  M1066a_V%Qmu_1066a( 74) =   332.000000000000
  M1066a_V%Qmu_1066a( 75) =   332.000000000000
  M1066a_V%Qmu_1066a( 76) =   332.000000000000
  M1066a_V%Qmu_1066a( 77) =   332.000000000000
  M1066a_V%Qmu_1066a( 78) =   332.000000000000
  M1066a_V%Qmu_1066a( 79) =   332.000000000000
  M1066a_V%Qmu_1066a( 80) =   332.000000000000
  M1066a_V%Qmu_1066a( 81) =   332.000000000000
  M1066a_V%Qmu_1066a( 82) =   332.000000000000
  M1066a_V%Qmu_1066a( 83) =   332.000000000000
  M1066a_V%Qmu_1066a( 84) =   332.000000000000
  M1066a_V%Qmu_1066a( 85) =   332.000000000000
  M1066a_V%Qmu_1066a( 86) =   332.000000000000
  M1066a_V%Qmu_1066a( 87) =   332.000000000000
  M1066a_V%Qmu_1066a( 88) =   332.000000000000
  M1066a_V%Qmu_1066a( 89) =   332.000000000000
  M1066a_V%Qmu_1066a( 90) =   332.000000000000
  M1066a_V%Qmu_1066a( 91) =   332.000000000000
  M1066a_V%Qmu_1066a( 92) =   332.000000000000
  M1066a_V%Qmu_1066a( 93) =   332.000000000000
  M1066a_V%Qmu_1066a( 94) =   332.000000000000
  M1066a_V%Qmu_1066a( 95) =   332.000000000000
  M1066a_V%Qmu_1066a( 96) =   332.000000000000
  M1066a_V%Qmu_1066a( 97) =   332.000000000000
  M1066a_V%Qmu_1066a( 98) =   332.000000000000
  M1066a_V%Qmu_1066a( 99) =   332.000000000000
  M1066a_V%Qmu_1066a(100) =   332.000000000000
  M1066a_V%Qmu_1066a(101) =   332.000000000000
  M1066a_V%Qmu_1066a(102) =   332.000000000000
  M1066a_V%Qmu_1066a(103) =   332.000000000000
  M1066a_V%Qmu_1066a(104) =   332.000000000000
  M1066a_V%Qmu_1066a(105) =   332.000000000000
  M1066a_V%Qmu_1066a(106) =   332.000000000000
  M1066a_V%Qmu_1066a(107) =   332.000000000000
  M1066a_V%Qmu_1066a(108) =   332.000000000000
  M1066a_V%Qmu_1066a(109) =   332.000000000000
  M1066a_V%Qmu_1066a(110) =   332.000000000000
  M1066a_V%Qmu_1066a(111) =   332.000000000000
  M1066a_V%Qmu_1066a(112) =   332.000000000000
  M1066a_V%Qmu_1066a(113) =   332.000000000000
  M1066a_V%Qmu_1066a(114) =   332.000000000000
  M1066a_V%Qmu_1066a(115) =   332.000000000000
  M1066a_V%Qmu_1066a(116) =   332.000000000000
  M1066a_V%Qmu_1066a(117) =   332.000000000000
  M1066a_V%Qmu_1066a(118) =   332.000000000000
  M1066a_V%Qmu_1066a(119) =   332.000000000000
  M1066a_V%Qmu_1066a(120) =   332.000000000000
  M1066a_V%Qmu_1066a(121) =   332.000000000000
  M1066a_V%Qmu_1066a(122) =   332.000000000000
  M1066a_V%Qmu_1066a(123) =   332.000000000000
  M1066a_V%Qmu_1066a(124) =   332.000000000000
  M1066a_V%Qmu_1066a(125) =   332.000000000000
  M1066a_V%Qmu_1066a(126) =   332.000000000000
  M1066a_V%Qmu_1066a(127) =   332.000000000000
  M1066a_V%Qmu_1066a(128) =   332.000000000000
  M1066a_V%Qmu_1066a(129) =   332.000000000000
  M1066a_V%Qmu_1066a(130) =   332.000000000000
  M1066a_V%Qmu_1066a(131) =   332.000000000000
  M1066a_V%Qmu_1066a(132) =   276.800000000000
  M1066a_V%Qmu_1066a(133) =   276.800000000000
  M1066a_V%Qmu_1066a(134) =   276.800000000000
  M1066a_V%Qmu_1066a(135) =   276.800000000000
  M1066a_V%Qmu_1066a(136) =   276.800000000000
  M1066a_V%Qmu_1066a(137) =   276.800000000000
  M1066a_V%Qmu_1066a(138) =   276.800000000000
  M1066a_V%Qmu_1066a(139) =   276.800000000000
  M1066a_V%Qmu_1066a(140) =   276.800000000000
  M1066a_V%Qmu_1066a(141) =   117.900000000000
  M1066a_V%Qmu_1066a(142) =   117.900000000000
  M1066a_V%Qmu_1066a(143) =   117.900000000000
  M1066a_V%Qmu_1066a(144) =   117.900000000000
  M1066a_V%Qmu_1066a(145) =   117.900000000000
  M1066a_V%Qmu_1066a(146) =   117.900000000000
  M1066a_V%Qmu_1066a(147) =   117.900000000000
  M1066a_V%Qmu_1066a(148) =   117.900000000000
  M1066a_V%Qmu_1066a(149) =   117.900000000000
  M1066a_V%Qmu_1066a(150) =   117.900000000000
  M1066a_V%Qmu_1066a(151) =   117.900000000000
  M1066a_V%Qmu_1066a(152) =   117.900000000000
  M1066a_V%Qmu_1066a(153) =   117.900000000000
  M1066a_V%Qmu_1066a(154) =   117.900000000000
  M1066a_V%Qmu_1066a(155) =   117.900000000000
  M1066a_V%Qmu_1066a(156) =   117.900000000000
  M1066a_V%Qmu_1066a(157) =   117.900000000000
  M1066a_V%Qmu_1066a(158) =   117.900000000000
  M1066a_V%Qmu_1066a(159) =   117.900000000000
  M1066a_V%Qmu_1066a(160) =   117.900000000000

! strip the crust and replace it by mantle if we use an external crustal model
  if (USE_EXTERNAL_CRUSTAL_MODEL) then
    do i=NR_1066A-3,NR_1066A
      M1066a_V%density_1066a(i) = M1066a_V%density_1066a(NR_1066A-4)
      M1066a_V%vp_1066a(i) = M1066a_V%vp_1066a(NR_1066A-4)
      M1066a_V%vs_1066a(i) = M1066a_V%vs_1066a(NR_1066A-4)
      M1066a_V%Qkappa_1066a(i) = M1066a_V%Qkappa_1066a(NR_1066A-4)
      M1066a_V%Qmu_1066a(i) = M1066a_V%Qmu_1066a(NR_1066A-4)
    enddo
  endif

  end subroutine define_model_1066a

